home *** CD-ROM | disk | FTP | other *** search
/ Risc World 3 / Risc World 3.iso / SOFTWARE / ISSUE3 / POWERBASE / DOCS / Ch14-Cust < prev    next >
Text File  |  2001-02-02  |  23KB  |  440 lines

  1. =============================
  2. Ch 14 − Customising Powerbase
  3. =============================
  4.  
  5. This chapter describes all the things you can do to influence the way
  6. Powerbase looks and functions.
  7.  
  8. 14.1    Overall control of the database
  9. ---------------------------------------
  10. A Powerbase database is normally controlled in four ways:
  11.  
  12. •       mouse-clicks on the keypad
  13. •       keystrokes which mimic the actions of the keypad
  14. •       choices from the main menu
  15. •       choices from the iconbar menu
  16.  
  17. Each of these can be disabled by deselecting one of the option switches on
  18. the Password window (see 11.2).  The main reason why you might want to do
  19. this is to provide limited facilities to someone else who is using your
  20. database.  It doesn’t, on the face of it, make a lot of sense to disable
  21. both the keypad and the keystroke-equivalents as no browsing or editing
  22. would then appear to be possible. You can, however, place some or all of the
  23. keypad buttons on the record window itself (see 4.2.8) thus allowing you to
  24. choose what functions you want to allow access to.  You might, for example,
  25. wish to provide only the “Next record”, “Previous record” and “Search”
  26. buttons.  Define these as Button fields at the time the record is being
  27. designed then disable the keypad and keystroke equivalents. Other switches
  28. in the Password window enable you to stop the user printing reports or
  29. exporting data as CSV files or subsets.
  30.  
  31. 14.2    Defining the function keys
  32. ----------------------------------
  33. Any button on the keypad may have its action duplicated by one of the keys
  34. F1-F11, with or without the use of Shift or Ctrl. Point at the button to
  35. which you wish to assign a key and click MENU to display the keypad menu.
  36. Assign leads to a window which shows the present key-assignment, if any. Use
  37. the “bump” icons to select the required function key and, if desired, select
  38. one of the switches for Shift and Ctrl. Click on the Assign button and you
  39. will now find that the assigned key exactly mimics the keypad button − even
  40. to the extent of actually “pressing” the button when you type the key.
  41.  
  42. One important constraint should be noted. Whatever key you assign to
  43. the Search button, Powerbase will automatically assign the shifted version
  44. of this key to the “search all subfiles” function (see 2.3.1). For this
  45. reason you should assign an unshifted key to Find and avoid assigning the
  46. shifted version to any other keypad button. Similarly, assigning a key to
  47. the Add record button automatically assigns the shifted key to the Copy
  48. record function.
  49.  
  50. You may save your key definitions by choosing Save choices from the
  51. keypad menu and you will find them operative next time you use Powerbase.
  52. Note that your definitions work with all the databases you use; there is no
  53. facility for saving separate assignments for each database. The default
  54. keystrokes (together with some which duplicate non-keypad actions) are
  55. listed in Appendix B.  If they have been redefined you may restore the
  56. defaults by choosing Defaults from the keypad menu. If you wish to “lose”
  57. the redefined keystrokes permanently you should restore the defaults as
  58. described then Save choices.
  59.  
  60. List keys on the keypad menu displays all the key definitions
  61. (including those for non-keypad functions) in a window from which the
  62. information may be saved as a text file.
  63.  
  64. Function keys may also be used to enter data into record fields or
  65. writable icons in dialogue boxes.  The actual programming of the keys is
  66. done at the command line which is accessed by pressing f12. This takes you
  67. temporarily out of the desktop and gives you a “star” prompt at the bottom
  68. of the screen.  Suppose you want to program f3 to enter the word
  69. “Powerbase”.  Type, at the star prompt:
  70.  
  71.         Key3 Powerbase
  72.  
  73. and press Return twice to return to the desktop.  The string assigned to the
  74. key may be entered by typing Ctrl Shift F3.  Any of the keys F1-F9 may be
  75. programmed and the string is always entered by typing the key with Ctrl and
  76. Shift both held down.
  77.  
  78. 14.3    CSV options
  79. -------------------
  80. It was explained in 8.2 how to access the CSV options window and what the
  81. pop-up menus and option switches are for.  The buttons Save choices, as
  82. default, in database, Load default and Cancel work in a similar way to that
  83. described above for the Print options window − with one notable difference.
  84.  
  85.                                 - 58 -
  86.  
  87. No Save box appears when you Save choices in database; the file is saved as
  88. a plain text file called CSVoptions. This more limited behaviour has been
  89. chosen because, although you might want several Print options files for
  90. different jobs, it is unlikely that you will have a use for several CSV
  91. options files.
  92.  
  93. 14.4    Preferences
  94. -------------------
  95. Several previous references have been made to the Preferences window which
  96. is opened from the iconbar menu. A full description of the choices offered
  97. in this window follows.
  98.  
  99. 14.4.1 Separators in date and time fields
  100.  
  101. By default Date fields have the format dd-mm-yy or dd-mm-yyyy, i.e. they use
  102. a hyphen as a separator. Time fields have the form hh:mm:ss, i.e the
  103. separator is a colon. These defaults may be changed by entering your
  104. preferred separators in the two writable icons in the Separators section at
  105. the top of the Preferences window and clicking Accept.  
  106.  
  107. Note that when entering dates or times into these field types you
  108. may actually type any non-numeric character you wish as a separator. On
  109. moving to another field Powerbase will re-format the date or time to use the
  110. separator specified in Preferences.
  111.  
  112. 14.4.2 Wild-cards
  113.  
  114. The use of wild-card characters is described in 2.5.5 and 3.5.3.  By default
  115. “#” represents a single character and “$” a group of characters which need
  116. not be matched.  You may change either or both wild-card characters if you
  117. wish in the same way as described above for date and time separators.
  118.  
  119. 14.4.3 Option switches
  120.  
  121. Record edits as CSV file when ON causes a CSV file called NewData to be
  122. created in PrintJobs. New and edited records are saved in this file which
  123. may then be used to enter data into another database. 
  124.  
  125. Launch new copy when ON causes another copy of Powerbase to be loaded when
  126. you double-click on a database, instead of closing the current database.
  127. This can be useful if you want to access several databases at once, as one
  128. copy of Powerbase only supports the use of a single database. If there is a
  129. dormant copy of Powerbase on the iconbar (i.e. one with “No data” under its
  130. icon) then double-clicking a database sends it to that copy rather than
  131. launching a new one. With the switch OFF double-clicking on a database
  132. closes down an already-open database before opening the new one. Even then
  133. you can load multiple copies of Powerbase by double-clicking on Powerbase
  134. itself and then open a different database in each by dragging the databases
  135. to the icons. 
  136.  
  137. Case-sensitive queries. You can choose the default state of the corresponding
  138. switch on the Query panel by setting this switch as required and saving the
  139. Preferences.
  140.  
  141. Recalculate on opening affects Computed fields (see 6.1 and 6.2) whose
  142. associated formulae make use of the system variable TIME$ and also Stamp
  143. fields for which Update to now is set in the Field Definition window (see
  144. 4.2.10). With the switch OFF the contents of such fields are recalculated
  145. only when a record is displayed. This might not be good enough where, for
  146. example, TIME$ is used in a User function (see 6.3) to keep track of
  147. people’s current ages. Selecting the switch causes Powerbase to scan the
  148. whole file and update such fields when the database is first opened.
  149.  
  150. Blank record on deletion. If this switch is OFF then deleting a record from
  151. the database merely removes all references to its key(s) from the index(es),
  152. leaving the actual record data untouched in the Database file. Although such
  153. “deleted” records will be overwritten when new records are entered, the
  154. situation may be deemed unsatisfactory from a security point of view since
  155. the “deleted” records can be examined by simply loading Database into Edit.
  156. If the switch is ON deletion causes the relevant record to be over-written
  157. with a blank record.
  158.  
  159. Keep descriptor with data alters the behaviour of fields as they are dragged
  160. around the screen when designing the record layout.  With the switch OFF you
  161. may drag the data field and the descriptor independently of one another.
  162. With the switch ON this is true only of the descriptor; if you drag the data
  163. field the descriptor jumps to its “normal” position to the left of the data
  164. field as soon as you release the mouse button. 
  165.  
  166. Validate input turns data validation (see Ch 5) ON and OFF.  If you ever
  167. find yourself unable to escape from a field linked to a validation table you
  168. can bring up the Preferences window, deselect this switch and try again.
  169. Shift-F9 also will toggle validation ON and OFF. If the keypad is visible
  170.  
  171.                                 - 59 -
  172.  
  173. you will see the List values button become shaded when validation is
  174. disabled.
  175.  
  176. Display linked table data. Every time the caret enters a field with a link to
  177. a validation table a window showing data from the relevant validation table
  178. row appears to the right of the field if the switch is ON. This is either
  179. useful or infuriating, depending on your point of view. If turned OFF you
  180. can still call up the window for a specific field by double-clicking on the
  181. field with SELECT (see 5.5).
  182.  
  183. Warn of external deletion. Since deleting data from an External field (see
  184. 2.6.3) involves the deletion of an actual file you will probably appreciate
  185. being warned when you are about to do it. With this switch ON you will be
  186. given a warning and the opportunity to change your mind.
  187.  
  188. Warn of duplicates. The creation of records with identical primary keys can
  189. be prohibited if so desired (see 11.2.1). Normally, however, they are
  190. permitted. You may, if you wish, turn this switch ON to issue a warning that
  191. such a record is about to be created.
  192.  
  193. Default action on Return. According to the Style Guide for RISC OS typing
  194. Return anywhere inside a dialogue box ought to have the same effect as
  195. clicking on the default action button (that’s the one with the yellow
  196. channel border) regardless of which writable icon the caret is in. If that’s
  197. what you want then turn this switch ON. Many users (including the author!)
  198. hate it and prefer the default action to take place only if the caret is in
  199. the last writable icon when Return is typed. Hence the default setting,
  200. which is OFF.
  201.  
  202. Strip leading spaces is ON by default.  Spaces at the beginning of data
  203. fields will be stripped before the record is written to the file.  Turn the
  204. switch OFF if you actually want spaces in this position
  205.  
  206. Strip trailing spaces should normally be left ON to avoid unwanted spaces at
  207. the right of data fields. It is easy to press the space-bar by accident when
  208. entering data quickly and you might not notice that a field has one or more
  209. spaces between the end of the last word and the caret. 
  210.  
  211. Balance every <n> records. The need to balance indices and the use of this
  212. option is explained in 10.6.
  213.  
  214. Remember place in subfile. With this switch OFF a change of subfile leads to
  215. the display of the first record in the new subfile. If you are doing a lot
  216. of hopping back and forth between subfiles to inspect specific records you
  217. might want to select the switch. It is then just as if you had bookmarks in
  218. separate chapters of a book; when you return to a subfile you have
  219. previously visited you will see the same record you were viewing when you
  220. left that subfile.
  221.  
  222. 14.4.4 Save indices (Default: Manual)
  223.  
  224. Indices are always saved whenever you close a database or quit Powerbase and
  225. only fear of power cuts or system failure (which includes some kind person
  226. switching off your computer!) need make you concerned about saving them
  227. yourself. With the Manual setting nothing happens during normal working
  228. unless you click Force update on the keypad.  Selecting Automatic or Warn
  229. only allows you to type in a suitable time interval (default = 10 min) at
  230. which Powerbase will either issue a warning to save your indices (using
  231. Force update) or actually save them for you.
  232.  
  233. 14.4.5 Start editing at
  234.  
  235. When a record is displayed the caret is placed, by default, in the first
  236. editable field.  Editing may be made to start at a different field by
  237. choosing Start editing from the Field submenu (see 2.5.4) or, alternatively,
  238. by placing the caret in the required field and typing Ctrl S.  The tag of
  239. the relevant field is stored in this writable icon in the Preferences window
  240. and can be saved along with the other preferences.
  241.  
  242. 14.4.6 Application for ImpulseII data-merging
  243.  
  244. As noted elsewhere (9.2) Powerbase can merge directly into a
  245. suitably-formatted Impression document by simply dropping the document icon
  246. onto the record window. The dialogue box which then appears contains a
  247. writable icon which shows the application with which Powerbase will merge.
  248. This name  is, by default, “Impression”, but may be altered by users for
  249. their own purposes. An application which will receive data from Powerbase in
  250. this way must make use of the ImpulseII protocols as defined by Computer
  251. Concepts. Even if you are using Style or Publisher the name to which these
  252. applications respond is still “Impression”. 
  253.  
  254. 14.4.7 Save choices
  255.  
  256. This section of the window works exactly as it does for CSV options (see
  257. 14.4) as do the Load default and Cancel buttons.
  258.  
  259.                                 - 60 -
  260.  
  261. 14.5    Colours of key fields and table-linked fields
  262. -----------------------------------------------------
  263. These may be selected in a window reached by choosing Colours from the
  264. Miscellaneous submenu. The following default colours are used: 
  265.  
  266. Type                                            Foreground    Background
  267. ----                                            ----------    ----------
  268. Descriptor of key field (inactive)              dark blue     light grey 
  269. Descriptor of key field (active)                red           light grey
  270. Data icon of primary key field(s)               black         pale yellow
  271. Data icon of field linked to validation table   dark green    white   
  272. Data icon of mandatory field                    red           white   
  273.  
  274. Clicking with SELECT on the descriptor and data icons within this window
  275. makes either the foreground or background (depending on the setting of the
  276. two radio buttons) cycle through the available colours. Clicking with ADJUST
  277. cycles through the colours in the opposite direction. 
  278.  
  279. The effect of the changes can be seen immediately and Save choices allows
  280. you to save them in the database as a file called Colours. Different
  281. databases can have different colours. Defaults enables you to return the
  282. colours to what they were before by loading Powerbase’s own Colours file,
  283. but you can overwrite this too if you wish by selecting in Powerbase before
  284. clicking Save choices. The Close button merely closes the window.
  285.  
  286. 14.6    Config files
  287. --------------------
  288. Inside the Powerbase application directory is a sub-directory called
  289. Resources. The file Config, which will be found there, determines certain
  290. aspects of the program’s operation which will seldom need changing. Changes
  291. made to Config take effect only when Powerbase is next loaded. Each
  292. attribute is identified by a token word and there is a comment line
  293. describing each.  The attributes in Config are as follows:
  294.  
  295. Fields     Maximum number of fields per record (default=100, maximum=127)
  296.  
  297. Keys       Maximum number of subsidiary indices (default = 10)
  298.  
  299. Tabs       Maximum number of validation tables (default = 10)
  300.  
  301. Cols       Maximum number of columns in a validation table (default = 20)
  302.  
  303. Scrolls    Maximum number of scrollable lists (default=5)
  304.  
  305. BTime      Number of seconds for which start-up banner (for a registered
  306.            copy) is displayed (default = 2)
  307.  
  308. LeftOpen   Whether submenus off the iconbar menu open on the left instead of
  309.            on the right as normal.  This avoids the overlapping submenus
  310.            which can occur but many users hate it!  (Default: NO)
  311.  
  312. BackGnd    Background colour of record window.  Default=1 (pale grey). 
  313.  
  314. Upper      Whether password entry is forced to uppercase. (Default: NO) 
  315.  
  316. DirOpts    Display option for directories opened by buttons on the record
  317.            window. Default is -si (small icons). This may be changed to -li
  318.            or -fi (large icons and full information respectively). The
  319.            options to sort by name, type, date and size (-sn, -st, -sd, -ss)
  320.            may also be added after a space.
  321.   
  322. ExtFiles   (default=NEW) Method used for storing Text, Sprite and Draw files
  323.            which are linked to External fields. You should normally leave
  324.            this set at the default (NEW). A description of the old and new
  325.            methods is given below (14.6.1).
  326.  
  327. Query      Default query method. Default: SF (Search Formula), alternative:
  328.            QBE (Query-By-Example).
  329.  
  330. PathLen    Maximum pathlength for Remote filer objects (default 255; max.
  331.            prior to RISC OS 4)
  332.  
  333. FontAdj    Whether width of data fields takes account of desktop font
  334.            (default: YES)
  335.  
  336. Multi      Whether Powerbase multi-tasks when printing lists, indexing etc.
  337.            (default: NO)
  338.  
  339. Markpane   Whether pane for marking records for printing etc. appears
  340.            attached to record window. (default: YES).
  341.  
  342. NameLen    Maximum filename (i.e. leafname) length (default: 10). If you
  343.            regularly use something like LongFiles or raFS, or if you have
  344.            RISC OS 4, you might want to increase this value but beware if
  345.            you give someone one of your databases containing saved files
  346.            with names longer than 10 characters!
  347.  
  348. ButtonAtts Attributes of Directory and Run file buttons when used on record
  349.            window (see 4.2.11). The default (42) is the width in pixels (not
  350.  
  351.                                 - 61 -
  352.  
  353.            OS units). The sprite will be vertically, as well as
  354.            horizontally, centred on the button unless you add L to the
  355.            number. If you do so then the leafname of the attached file or
  356.            directory will appear on the button underneath the sprite.  You
  357.            will probably need to make the button much wider to accommodate
  358.            the leafname.
  359.  
  360. DialDelay  Double-clicking with SELECT on a field containing a phone number
  361.            whose tag or descriptor contains the string TEL (case
  362.            insensitive) will attempt to produce dial-tones through the
  363.            internal speaker. If you hold a telephone handset where it can
  364.            “hear” the tones the number will be dialled. This Config option
  365.            allows you to specify the delay in second between the
  366.            double-click and the tones. (Default=5)
  367.  
  368. TimeFirst  determines the interpretation of incomplete entries in Time
  369.            fields (see 4.2.5) Default=H (hours first), alternative=S
  370.            (seconds first)
  371.  
  372. FullTime   Either always display as hh:mm:ss (default=YES) or allow mm:ss
  373.            for times under 1 hour (NO)
  374.  
  375. Output     If 1 (default) send output for Printer destination directly to
  376.            printer. If 2 write first to file, then copy to printer. The
  377.            latter may be needed to overcome problems with certain
  378.            combinations of hardware and versions of !Printers.
  379.  
  380. Individual databases may be provided with their own Config files but Fields,
  381. Keys, Tabs, Cols, BTime and LeftOpen may only be set in Powerbase’s own
  382. Config file and will affect all databases. BackGnd may be set for an
  383. individual database but will affect only the background colours of field
  384. descriptors, not the window colour itself. Where choices are valid they
  385. override Powerbase’s own settings.
  386.  
  387. 14.6.1 Pathnames for External file objects
  388.  
  389. The OLD method of deriving the pathname for the stored file object  is as
  390. follows:
  391.  
  392. (a)     Divide the record number by 4900. The integer part of the result is
  393.         used as the name of the top-level directory.
  394.  
  395. (b)     Divide the record number by 70. The integer part of the result is
  396.         used as the name of the second-level directory.
  397.  
  398. (c)     The integer remainder of dividing the record number by 70 is used as
  399.         the actual filename.
  400.  
  401. This is an awkward system if you are in the habit of using the filer windows
  402. to sift through the files rather than relying on Powerbase to display them.
  403. To calculate the number of the record to which the file belongs you have to
  404. take the number forming the name of the file’s parent directory, multiply by
  405. 70 and add the number corresponding to the filename itself.          
  406.  
  407. The new system improves on this. Steps (a) and (b) are identical. The
  408. filename itself, however, uses the whole record number preceded by Rec, e.g.
  409. a file associated with record 275 will be called Rec275. You can therefore
  410. use the RISC OS filer’s Find command to locate and examine the file. Under
  411. the OLD system such a file would be called 65.
  412.  
  413. The default setting in Config is NEW.  Users should be aware that the
  414. earliest version of Powerbase to support this feature is v. 6.94, dated
  415. 02-03-96.  This and later versions understand both methods of storage and
  416. will rename files according to the Config setting when a record is
  417. displayed. Thus, a database created under an earlier version in which record
  418. 275 is represented by a file called 65 will have that file renamed to Rec275
  419. simply by displaying the record, even if the file itself is not loaded. 
  420. Once this has happened the file cannot be found by an earlier version of
  421. Powerbase.  Under most circumstances this should not cause any difficulty;
  422. just make sure you are using v. 6.94 or later.  Should you wish to run a
  423. database under an earlier version and access the External file objects from
  424. the record window you must first convert the filenames to the OLD format. 
  425. To do so place OLD in the Config file as described above, then load
  426. Powerbase. Open your database and click on the Play button.  Click on Stop
  427. when all records have been displayed. If you use more than one subfile you
  428. will need to do this for each occupied subfile.  OLD may be converted to NEW
  429. pathnames in a similar way.
  430.  
  431. 14.7    The Messages file
  432. -------------------------
  433. This text file in the Resources sub-directory contains all the error and
  434. warning messages used by Powerbase including those for Acorn’s interactive
  435. Help application. The wording may be altered if you wish.  Many error
  436. messages contain the string “%0” and possibly “%1” and “%2”.  Data items are
  437. substituted for these when the message is printed so don’t omit them or
  438. alter their logical placement within the message.
  439.  
  440.                                 - 62 -